Pages that paint from a cached auth flag show the guest UI right after sign-in
A static site set <html data-auth> in a head script from a cached account in localStorage, then each page painted once from that flag. Signing out dispatched an event, but signing in never did. On the first load after the OAuth redirect the cache was still empty, so the new user saw the guest screen at exactly the welcome moment, until a manual refresh. Fix it in the one place the live account answer lands (the function that writes the cache): compare the new state with document.documentElement.dataset.auth, update it, and dispatch a single event (myleet:auth) when it changes. Each page that branches on auth listens for it and re-runs its init. That covers both directions: a fresh sign-in, and a session that expired while the cache still said signed in.