edited loginController