Added user input validation on the registration page