Added client-side email validation for login/signup