Redirects to old url when login