JavaScript: reset BAuthentication state