diff --git a/app/routers/auth.py b/app/routers/auth.py
index 05e3de1..e567aa4 100644
--- a/app/routers/auth.py
+++ b/app/routers/auth.py
@@ -284,9 +284,32 @@ async def verify_resend(
# ---------------------------------------------------------------------------
+_LOGOUT_HTML = """
+
+Signing out…
+
+
+Signing out…"""
+
+
@router.post("/logout")
async def logout(request: Request):
- resp = RedirectResponse(url="/login", status_code=303)
+ resp = HTMLResponse(content=_LOGOUT_HTML)
resp.delete_cookie(SESSION_COOKIE_NAME, path="/")
_clear_pending_cookie(resp)
return resp
diff --git a/app/templates/base.html b/app/templates/base.html
index aec5c88..9fdb0d1 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -4,6 +4,29 @@
{% block title %}{{ BRAND_NAME }}{% endblock %}
+ {# Cross-user contamination guard.
+
+ localStorage is browser-wide; if User A uploads a portfolio and User B
+ logs in on the same browser, the stale `cassandra.pie` would otherwise
+ render as User B's holdings. We stamp the logged-in user's id in
+ localStorage on every authenticated page load and wipe per-user keys
+ if the id changed since last time. Theme stays — it's cosmetic. #}
+
{# Apply saved theme before stylesheet renders to avoid a flash. #}