Added validations and added index to email to ensure uniqueness.