Is there such an app or script that automatically logs off a user after a given number of minutes of activity?
You could try using an Apple Script, something like;

tell application "System Events"
    log out
end tell


Then schedule it using launchd.  I've used this as a nice GUI front-end to launchd in the past;

http://www.peterborgapps.com/lingon/

launchd can be a little frustrating to use as you have be very exact with your syntax and naming, however if you don't want to spring the $5 for Lingon, there is a Ruby Gem on GitHub I found called lunchy

https://github.com/mperham/lunchy

The downside with this is that you're running to a schedule rather than only running the script when a user has logged in.