Better login redirection. Closes #201