Added registration form validation code