How do you
disconnect the user session?
How do you indicate to the user session
that it has been disconnected?

If a token is dissassociated from the thin client (e.g. the
user removes their smartcard) it will generate a protocol
event to the server indicating a disconnection, which will
be again matched as above and a disconnect event will
be sent to all registered services (like the X server DDX).

I should mention for completeness that SRSS
maintains heartbeats to thin clients connected to
the server, and if one times out it synthesizes a
disconnect event for it to registered services so
that e.g. the X server stops sending rendering
content to the unreachable thin client.
-Bob