       )(req, res, next)
 
   userAction = (req, res, next) ->
-    @publicAction req, res, () =>
+    exports.publicAction req, res, () =>
       if req.isAuthenticated()
         permissionsMiddleware req, res, next
       else
-        @_hmacAuth req, res, (err, user) =>
+        exports._hmacAuth req, res, (err, user) =>
           if user and (not err)
             permissionsMiddleware req, res, next
           else
-            @_playAuth req, res, (err, user) ->
+            exports._playAuth req, res, (err, user) ->
               if user and (not err)
                 permissionsMiddleware req, res, next
               else

      res.json 500, {message: 'host not found on request object'}

  publicAction = (req, res, next) ->
    @_systemCheck req, res, next

  hmacAuth = (req, res, next) ->
    if _.indexOf(options.strategies, 'Hmac') is -1

    if _.indexOf(options.strategies, 'Facebook') > -1
      facebook.routes app, publicAction

  exports = 
  #Export the authentiaction action middleware
    publicAction: publicAction
    userAction: userAction
    adminAction: adminAction
    sysAdminAction: sysAdminAction
    _systemCheck: systemCheck
    _hmacAuth: hmacAuth
    _playAuth: playAuth

  exports