hide register page when errors occur