Generally, the www version of your site and the non-www version of your sites are considered to be different sites by browsers. For this reason, some stuff will not work due to a security rule built in browsers. You would need to choose either as your main one and redirect the other one to the main one. The easiest way to do this is to put the following code in the file .htaccess right after RewriteBase / . Don't forget to add your own domain name in the code.
RewriteCond %{HTTP_HOST} ^www.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [R=301,L]