Can "logout" in Shiny Server Pro be used to trigger a reaction in a shiny app?

I have an app for students running on Shiny Server Pro. I use session$onSessionEnded to save state when the session stops or the user closes the browser (tab). State is also be saved when the user clicks a button. I'd like the same thing to happen when the the user clicks the logout link in Shiny Server Pro.

Is there an easy way to track if the "logout" link has been clicked? Ideally it would be something I can use with observeEvent but I don't see any information about login/out status in the input list.

Thanks