refactor auth required wrapper to follow express middleware conventions
api resource bearer token authorization