Validation for login and registration

Validation for login and registration