Learn how to automatically log out users after a period of use.
How to make your scripts wait for the user to log out before continuing. In this recipe we use Power Manager's await log out action.