After sign in or sign out, reload the page with window.location.reload() - fixes sign in / sign out bugs in Firefox.