diff --git a/web-assets/js/setupAuth0WithRedirect.js b/web-assets/js/setupAuth0WithRedirect.js
index 7bdf64e..fd57456 100644
--- a/web-assets/js/setupAuth0WithRedirect.js
+++ b/web-assets/js/setupAuth0WithRedirect.js
@@ -89,6 +89,9 @@ const authSetup = function () {
             return;
         } else if (!isLoggedIn() && returnAppUrl) {
             login();
+        } else if (qs['error'] && qs['state']) {
+             logger("Error in executing callback(): ", qs['error_description']);
+             showLoginError(qs['error_description'], appUrl);
         } else {
             logger("User already logged in", true);
             postLogin();
@@ -455,6 +458,15 @@ const authSetup = function () {
         return hostname;
     }
 
+    function showLoginError(message, linkUrl) {
+        try {
+            document.getElementById("page-title-heading").innerHTML = "Alert";
+            document.getElementById("loading_message_p").innerHTML = message + " <a href=" + linkUrl + ">click here</a>";
+        } catch (err) {
+            logger("Error in changing loading message: ", err.message)
+        }
+    }
+
     // execute    
     init();
 };