Fix login redirect for non default (root) context

Login redirection was working fine when gerrit is deployed in the root
context but did not otherwise.

Issue: 2990
Change-Id: I851d45d4b9de1f70e45cdd5daaa838546dae02db
Merge "Fix login redirect for non default (root) context" into stable-2.10