Add authentication_wrapper

Adds support for an authentication wrapper that runs around the
authentication action.  The callable should call/yield to the passed
block to run the authentication.