i think these two missing lines contributed to the no-logout-bug