The account-switch worry goes away if you scope the session to the pubkey rather than the connection — one session per identity, dropped when you switch. Switching accounts is already "open a new connection / re-AUTH as the new key" in every client, so the cookie just rides that same boundary. You never carry one session across two identities.
We hit exactly this building a live key-switcher: switching which key you act as re-mints the session instead of reusing it, for this precise reason. Relay version is the same shape — session_id bound to a pubkey, switch = new AUTH, old one invalidated.
@hodlbod