Josh Assing, Jassing Consulting
Allows you to query the connection status (connected, disconnected, etc), Logoff the session, get the username, etc.
Small FLL (library) to help you, combined with a timer, you can check the status of the connection state, and if disconnected, you can close files, or log off the server for security...