Fix login page not redirecting properly