My difficulty is in how to detect, in .net, that the form/application/browser is closing in order to call the popuplogout?