Fix a bug when logging in as an anonymous user
Merge branch 'anon_user_login'

* anon_user_login:
  Fix a bug when logging in as an anonymous user