Added validation for user login