                  :on-failure      [:error-message "GitHub registration failed"]}
     :db         (dissoc db :registration-token)}))
 
+(defmethod events/load-view
+  :register [_ _]
+  {:dispatch [:country-detect]})
+
+(defmethod events/load-view
+  :github-loading [_ _]
+  {:dispatch [:country-detect]})
+
 (re-frame/reg-event-fx
  :country-detect
  [(re-frame/inject-cofx :local-store "country")]

            [bouncer.validators :as validators]
            [holiday-ping-ui.db :as db]
            [holiday-ping-ui.routes :as routes]
            [holiday-ping-ui.auth.token :as token]))

;;; AUTH EVENTS

                     [:user-load {:access_token stored-token}]]}

       (and (not auth-route?) (not logged-in?))
       {:db       db/default-db
        :dispatch [:navigate :login]}

       (github-callback? path)
       {:db       db/default-db
        :dispatch [:github-code-submit]}

       (and stored-token (token/expired? stored-token))
       {:db                 expired-db
        :remove-local-store "access_token"}

       stored-token
       {:db       db/default-db
        :dispatch [:user-load {:access_token stored-token}]}

       :else
       {:db db/default-db}))))

(defn- basic-auth-header
  [user password]
