added validations to registration