added login action method to the UserController + model