so there clearly is an idle event i have not jumped into it but a great place to start.
i use timers myself and that drives a lot of what I do for auto-logoff or prompting saying it will happen unless you click No now.
basically i use a timer that fires once a minute to call wsdl wcf routines to refresh summaries and update info on the screen. good for user to user messaging too but you need sockets for more timely chat stuff.
when the user moves between modules or calls any backend routine (wsdl wcf) then i update a datetime for that request. sort of a global singleton class. if 30 minutes passes by (compare timer event nowdatetime to that variable of last request). if greater than allowed time then throw up a messagebox saying hey bud are you there you are about to be logged off Yes or No.
for some assignments i have even saved their current State if i log them off so when they log in again i re-zoom them to where they were. It is a challenge but hey they pay for it.
there are many ways to skin the cat find one you like.