Website saves separate sessions for "www.domain.com" and "domain.com" I open a browser, type "www(dot)mydomain(dot)com"
I login as an admin
I open a new tab, type "mydomain(dot)com". I'm logged out, and i can login as a different user..


It's weird. I can't find anything helpful on google (or i don't know the right search keywords). Does anyone here have any idea?

Thanks :)
For usability (this problem) and SEO reasons you should redirect all visitors to a single version of the site. Look in the .htaccess file and you should see instructions on how to do a 301 redirect to send people to either the www or the non-www version of the site. 

If you really really do want to make the site work on both versions, open your settings.php and find the line for $cookie_domain. Set it to be the "example.com" version and it should work.