Provide session uid when ending session.
Fix session uid reference, add clear method.