message and session management