validate the login form