Fixed email unique constraint violation error in registering