session management sorted