     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 foursquare-logout-handler [db [_]]
  "Called when the page starts on a foursquare callback URL."
  (assoc-in db [:foursquare :token] nil))

(defn localstorage-get-foursquare 
  "Called when a value for the foursquare toekn is found in localstorage"
  [db [_ token]]
  (assoc-in db [:foursquare :token] token))

;; Set up all event handlers and fire off initial events
(defn init! [initial-state local-storage-keys]

    ;(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 "")
