 done-reference is some sort of deref-able instance that will tell the thread to quit.
 This feels like an odd approach, but nothing more obvious springs to mind."
   [ctx done-reference]
-  (println "Kicking off the authentication runner thread in context: "
-           ctx "\nwaiting on Done Reference " done-reference)
+  (log (str "Kicking off the authentication runner thread in context: "
+            ctx "\nwaiting on Done Reference " done-reference))
   (.start (Thread. (fn []
                      (authenticator ctx done-reference)))))

(defmethod dispatch "dieDieDIE!!"
  [_]
  ;; Really just a placeholder message indicting that it's OK to quit
  (log "Quit permission")
  "K")


  (:gen-class))

(defn- log [msg]
  "FIXME: Debug only."
  (with-open [w (io/writer "/tmp/log.txt" :append true)]
    (.write w (str msg))
    (.write w "\n")))

(defn- read-message [s]
  (mq/recv-all-str s))
