This is pretty dangerous -- if `onlogout` gets called on page load (which is possible, unfortunately), we get an endless reload loop :(

Why do you have this here anyway? Is it to reset the UI on that button?