Added the check for duplicate email registration