its not that is logs you out, its just your cookies think the www is a different site then the no www. this can be fixed with a simple re-write in your htaccess file to force either www or no www. find out how google has indexed your site and then add the code to your htaccess tuts here .Htaccess rewrites, Mod_Rewrite Tricks and Tips