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