Grab the session id and the user's IP address when they first log in. Save that somewhere secure with a timestamp (I use DB_File), then check each subsequent request against what you have stored - the IP to ensure a logged-in user, and the current time against the timestamp to enforce time-outs. You may want to reset the timestamp each time too to avoid annoying your users.
EDIT: I didn't see InfiniteSilence comment.