[regression] Fixed a regression where upon logging out of the app, and then attempting to log back in later, the page would not load & would hang indefinitely. Added some new tests around the regression code to ensure we don't hit that in the future!