 
 (defn foursquare-logout-handler [db [_]]
   "Called when the page starts on a foursquare callback URL."
+  (local-storage/save-foursquare-token! nil)
   (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]

    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

  ; Fire off the first event
  (dispatch [:initialize initial-state local-storage-keys])
  ; Set page state from URL
  (dispatch [:route]))
