diff --git a/lib/components/app/responsive-webapp.js b/lib/components/app/responsive-webapp.js
index <HASH>..<HASH> 100644
--- a/lib/components/app/responsive-webapp.js
+++ b/lib/components/app/responsive-webapp.js
@@ -126,13 +126,19 @@ class ResponsiveWebapp extends Component {
     // Add on back button press behavior.
     window.addEventListener('popstate', handleBackButtonPress)
     document.title = title
-    if (window.location.search) {
-      // If a URL is detected without hash routing (e.g., http://localhost:9966?sessionId=test),
-      // window.location.search will have a value. In this case, we need to redirect to the URL root with the
-      // search reconstructed for use with the hash router. This redirect should cause little disruption.
-      window.location.href = `${URL_ROOT}/#/${window.location.search}`
+
+    // If a URL is detected without hash routing (e.g., http://localhost:9966?sessionId=test),
+    // window.location.search will have a value. In this case, we need to redirect to the URL root with the
+    // search reconstructed for use with the hash router.
+    //
+    // Exception: Do not redirect after auth0 login, which sets the URL in the form
+    // http://localhost:9966/?code=xxxxxxx&state=yyyyyyyyy that we want to preserve.
+    const search = window.location.search
+    if (search && !search.startsWith('?code=')) {
+      window.location.href = `${URL_ROOT}/#/${search}`
       return
     }
+
     if (isMobile()) {
       // If on mobile browser, check position on load
       getCurrentPosition()
fix(ResponsiveWebapp): Do not reformat URL after auth0 login.