Add missing middleware and cookieSecret