Add client-side form validation for registration.
Add client-side form validation for login.