     url-route-handler)
 
   (register-handler
-    :open-login-window
-    debug
-    open-login-handler)
-
-  (register-handler
     :redirect-to-foursquare
     debug
     redirect-to-foursquare)
-
-  (register-handler
-    :foursquare-got-token
-    debug
-    foursquare-token-handler)
 
   (register-handler
     :foursquare-logout

(defn- url-to-page [[page-name {:keys [url]}]]
  [url page-name])

(defn save-foursquare-token [db token]
  ; save the token to local storage
  (local-storage/save-foursquare-token! token)
  ; Redirect the user and replace the URL
  (redirect-home! (assoc-in db [:foursquare :token] token)))

(defn url-route-handler [db _]
  "This handler gets called when the page first loads. It is intended to look at the URL 
  the user is on and restore them to the proper state if necessary. This handler will be 

    ;(inspect urlmap "urlmap")
    (cond
      (= (count foursquare-match) 2) 
        (let [token (second foursquare-match)]
          ; save the token to local storage
          (local-storage/save-foursquare-token! token)
          (redirect-home! (assoc-in db [:foursquare :token] token)))
      selected-page
        (assoc-in db [:navigation :current-page] selected-page)
      (= path "")
