register form with validation