The simply the best collection of timeout scripts
After a set amount of time a dialog is shown to the user with the option to either log out or stay connected with appropriate actions.