See How do we get access to the session for ways to retrieve the session.
One way of invalidating a session; contributed by Ray Clough.