added validations, indexing email, updated tests