   []
   (reify
     IAuthentication
-    (parse [_ context]
+    (-parse [_ context]
       (:identity @(:session context)))
-    (authenticate [_ context data]
+    (-authenticate [_ context data]
       (p/resolved data))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Handlers
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;; TODO: remove unnecesary promise/callback chaining
-
 (defn- do-auth
   "Perform an asynchronous recursive loop over all
   provided backends and tries to authenticate with
   all them in order."
-  [context backends callback]
-  (if-let [backend (first backends)]
-    (let [last? (empty? (rest backends))
-          token (parse backend context)]
-      (if (and (nil? token) last?)
-        (callback {})
-        (-> (authenticate backend context token)
+  [context callback [backend & backends]]
+  (if backend
+    (let [token (-parse backend context)]
+      (if (nil? token)
+        (do-auth context callback backends)
+        (-> (-authenticate backend context token)
             (p/then (fn [ue]
                       (if (nil? ue)
-                        (do-auth context (rest backends) callback)
+                        (do-auth context callback backends)
                         (callback {:identity ue}))))
             (p/catch (fn [e] (callback {}))))))
     (callback {})))

    :or {token-name "Token"}}]
  (reify
    IAuthentication
    (parse [_ context]
      (parse-authorization-header context token-name))
    (authenticate [_ context token]
      (p/promise (fn [resolve]
                   (try+
                    (resolve (jws/unsign token secret options))

    :or {token-name "Token"}}]
  (reify
    IAuthentication
    (-parse [_ context]
      (parse-authorization-header context token-name))
    (-authenticate [_ context token]
      (p/promise (fn [resolve]
                   (try+
                    (resolve (jwe/decrypt token secret options))
