use form api to rebuild register form