Updated register form and error validation