fix adding auth middleware for new AH api

It seems we need to use api.actions.addPreProcessor(function(connection, actionTemplate, next), priority) in latest AH versions.