Fix redirect to login for /a/<domain>/
Merge pull request #520 from kennknowles/case-51348-redirect

Fix redirect to login for /a/<domain>/