Undoing the addition of the Window.ClosingHandler. It caused more problems than it solved. This is most likely because the hooks should not have been added to onModuleLoad(), but it is not worth investigating further at this point because there are better solutions for logging a user out.