Added client side validation for login.