added part of session management (onopen, inclose, list of sessions)