title: Identity cookie in user authentication deleted right after login
body: <p>I am developing an webapp and have been running by some problems with the user authentication implemented in Yii2's Advanced Template.</p>
  
  <p>The thing is, it runs fine locally, but on the production server the login seems to not work properly. It validates the data correctly (user and password), and if they match any entry in the database I can track via the F12 function on Chrome that I have been redirected to the index page, as expected. The problem is that, after being redirected to the index page, it redirects me back to the login page (as if I wasn't authenticated). Inspecting the browser's cookies I can see that the identity cookie used by Yii2 is already marked as 'deleted' at this point.</p>
  
  <p>What may be the problem? Is Yii2 not being able to save the state of the user perhaps? How can I try to debug that?</p>