Added session management functionality