adding error validation for login form