console.warn("localStorage is not available. Auth data will not be cached!");
            return false;
          }

          if (localStorage[storageKey]) {
            data = JSON.parse(localStorage[storageKey]);
            if (!data) {
              // initialize localStorage to empty object
              localStorage[storageKey] = JSON.stringify({});
              data = JSON.parse(localStorage[storageKey]);
            }
          }

          element.find("input, textarea").each(function () {
      