added email validation to user model