  (fn [k r os ns]
    (local-storage-write ::use-live-data? ns true)))
 
+(def access-token (atom nil))
 
 (defn ajax [arg-map]
   (let [url (:url arg-map)

          call-on-done (fn []
                         (let [status-code (.-status xhr)
                               get-parsed-response #(parse-json-string (.-responseText xhr))]
                           ; TODO: Fix this with a real log-out once the login bug is fixed and logout is implemented.
                           (if (= status-code 401)
                             (set! (-> js/window .-location) "/")
                             (on-done {:xhr xhr
                                       :status-code status-code
                                       :success? (and (>= status-code 200)
                                                      (< status-code 300))

  (js->clj (js/JSON.parse x)))


(defn keywordize-keys [m]
      (into {} (map (fn [[k v]]
                        [(keyword k) (if (map? v) (keywordize-keys v) v)])
                    m)))

(defn local-storage-write
  ([k v] (local-storage-write k v false))
  ([k v stringify?]
