So, if you use PUC you get a nice warning once your session on the server has timed out. (I've not looked into how this works tho!)
If you use ctools directly you don't get this because it comes from PUC.
So how can it be replicated? Any ideas?
Something like this i guess?
Another idea is something like this:
In fact, rather than trying to detect timeout, why not just setup something to ping the server every 5 minutes to keep the session alive? Then they only time out once the browser is shut down.