Added check for duplicate email address