You logout a user by deleting the authentication cookie. The server can not do this if the tab is closed, as this closes the connection to the client. You can detect the signal/r circuit closed.
then store in a persistent store that the user failed to logout. Then in the next request from that user, force a logout by deleting the cookie.