added validations for login