implemented checks for unique email constraint