Added client side validation for logging in