Adds authentication middleware hooks and configuration in package.json.