These are the same LoginHook and LogoutHook which have been available on the 'net for some time. However, they have previously been bundled with the program "Bypass" and I could never remember where they were, so I decided to put them in their own .tar.gz folder.
They are compiled QuadFat by Eric Tremblay (eric@cdrom.com) and I copied them off the Nebula/Walnut Creek CD-ROM set which Eric puts together.
For those who aren't familiar, these programs, see
(where /usr/local/bin is the path to the two programs found herein).
LoginHook will look for the file ~/.LoginHook when a user logs in and run it before the loginwindow starts up.
LogoutHook will look for the file ~/.LogoutHook when a user logs out and will run it before completing the logout.
I find it useful to prompt for the user to clean out their Recycler using the LogoutHook, and also use it to ask me if I want to reboot the machine, power the machine down, or just exit. See the script "Logout.sh" for an example of what you might want to do in ~/.LogoutHook