moved Authenticate and BasicAuthenticate helpers to req/res style.