diff --git a/apps/edr-freight-web/portal/src/App.tsx b/apps/edr-freight-web/portal/src/App.tsx
index 09cd860fc..030da4178 100644
--- a/apps/edr-freight-web/portal/src/App.tsx
+++ b/apps/edr-freight-web/portal/src/App.tsx
@@ -74,10 +74,14 @@ const App = () => {
const userEmail = user?.email;
const handleLogout = () => {
- // Best-effort server-side session invalidation; local cleanup always runs
- // so a failed API call (e.g. expired token) never leaves the user stuck.
logout();
- ["auth-token", "refresh-token"].forEach((name) => {
+ [
+ "auth-token",
+ "refresh-token",
+ "auth-user",
+ "current-position-id",
+ "selected-position-id",
+ ].forEach((name) => {
document.cookie = `${name}=; Max-Age=0; path=/`;
});
localStorage.clear();
@@ -113,6 +117,7 @@ const App = () => {
path="/admin/dropdowns"
element={}
/>
+ } />
} />
diff --git a/apps/edr-freight-web/portal/src/main.tsx b/apps/edr-freight-web/portal/src/main.tsx
index b5c8c3a6f..d0a07ba14 100644
--- a/apps/edr-freight-web/portal/src/main.tsx
+++ b/apps/edr-freight-web/portal/src/main.tsx
@@ -50,7 +50,7 @@ window.__USER_MANAGEMENT_BRANDING__ = {
organizationName: "EDR Platform",
appName: "EDR Portal",
moduleBasePath: "/user-management",
- backToAppPath: "/dashboard",
+ backToAppPath: "/",
backToAppLabel: "Back to dashboard",
};