Trigger at re-login

I have a windowless NSStatusItem app that launches at login and keeps track of time a user is logged in.

So lets say, the user walks away from the computer and it auto-logs out...then they come back later and log back in. How can I trigger something in my app when they log back in, assuming my app was running the entire time?