title: Issues with CakePHP AuthComponent
body: <p>I'm having issues with CakePHP's AuthComponent.</p>
  
  <p>Here is the complete scenario.</p>
  
  <ul>
  <li>The app runs on Nginx, CakePHP 2.3 and MySQL.</li>
  <li>The nginx server has a 301 redirect which redirects users from domain.com to www.domain.com.</li>
  </ul>
  
  <p>The user login works well when the host is domain.com and does not work when the host is www.domain.com. After a bit of googling I found out that this was a security feature from CakePHP. Turns out that it forces the <code><pre> session.referer_check to true </pre></code></p>
  
  <p>There are a few solutions on stackoverflow and other sites too, but using old CakePHP versions and it does not work with my cake app.</p>
  
  <p>This issue has taken a day already!</p>
  
  <p>Please share your experiences?</p>
  
  <p>Thanks.</p>