Added some validation to LoginController