fixes #4522 Auto-login Broke
Merge pull request #4636 from dotCMS/issue-4522-auto-login-broken

fixes #4522 Auto-login Broke