client side validation on login