Fixed issue where login, logout and login again would fail in the browser.