Fixing a bug where the UI was not updated on logout