Added server side validation for registration