XF 1.3 Site log in with and without www.

If you log in on XenForo using www. infront of your domain name and then visit a page without the www. then XenForo will ask you to log in again.

How can we allow the cookies to work on both www. and without www. domains?

I hope I made sense.