modified login_controller