Added client side validation for registration