diff --git a/src/App.tsx b/src/App.tsx
index b77194889a83d5f1247d6d7c897a35b8b2e7c4c4..e5cf11ca04b0514606273bed02a369290f0c8fd0 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -31,7 +31,7 @@ export const App: FC = () => {
     // Initialize asking the server if this session is already logged in.
     isAuthenticated().then((responseState) => setIsAuth(responseState));
     getRole().then((responseRole) => setRole(responseRole));
-  }, []);
+  }, [isAuth, role]);
 
   return (
     <div data-testid="App">