The Control UI says unauthorized or keeps reconnecting What now

Your gateway is running with auth enabled (gateway.auth.*), but the UI is not sending the matching token/password.
Facts (from code):
The Control UI stores the token in browser localStorage key openclaw.control.settings.v1.
The UI can import ?token=... (and/or ?password=...) once, then strips it from the URL.
Fix:
Fastest: openclaw dashboard (prints + copies tokenized link, tries to open; shows SSH hint if headless).
If you don’t have a token yet: openclaw doctor --generate-gateway-token.
If remote, tunnel first: ssh -N -L 18789:127.0.0.1:18789 user@host then open http://127.0.0.1:18789/?token=....
Set gateway.auth.token (or OPENCLAW_GATEWAY_TOKEN) on the gateway host.
In the Control UI settings, paste the same token (or refresh with a one-time ?token=... link).
Still stuck? Run openclaw status --all and follow Troubleshooting. See Dashboard for auth details.