fixing validation for user login