Added form validation to the login page