Joomla! log in error on http vs http://www
Consider picking either www.site.com or site.com as the canonical domain. Then:


Setup an httpd redirect (in Apache or nginx) from one domain to the other domain.
Ensure that the configuration files (e.g. both of Joomla's civicrm.settings.php files) and "Resource URLs" consistently point to the same domain.


(Alternatively, you could dig further into how the URL settings work, but usually, when you consider SEO and marketing consistency, it's higher-value to use the same domain consistently.)