isLogin) { return $response->withStatus(302)->withHeader('Location', '/user'); } $response = $next($request, $response); return $response; } }