The App SandBox ate my code...
TokenLock can be set up to run Applications, AppleScripts or Applications when it locks or unlocks. On the Scripts tab, you can configure these.
You may want to sign out of your IM client, and sign back in again - as an example.