Added validations to the login