Fixed a bug in validating user emails