prevent register form from reloading on error