JS fixes to the email validation