Client → Login (credentials)
Server → Validate credentials
Server → Create a session (and store)
Server → Return session ID (almost always use cookies)
Client → Store session ID (auto at cookie)
Client → Send cookie (session ID) on every request
Server → Look up session
Access granted
When log out, must delete session and clear cookie (regenerate new session in new login)
// to avoid attacker get the old session and use again