added validations for login and registration