refactored user spec and added test for email validation