register form and front-end validation