issue MDL-46976:email addresses not trimmed during registration, edited validation of email to remove spaces