Added wrap-authentication middleware.