Added error handling register form