Minor bug fix in URL redirect after login