Added validation for unique email and more user friendly error messages.