Next.js 16 Middleware: auth patterns and race conditions