Repairing login redirection