Website saves separate sessions for "www.domain.com" and "domain.com"
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.