Whenever you're ready, walk me through how you'd approach this.
Design a system to handle logins and logouts. Explain how you would represent active sessions, validate credentials, and ensure logout invalidates a session. Discuss how your design handles concurrent requests, retries, and failures. Focus on the core logic and relevant data structures rather than infrastructure choices.