added basic form validation for registration