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.

Note: This PR requires ruby 1.9 or greater.  See discussion on #158 about ruby versions.