http_connection: Fix loggedIn check and timeout

The code was using `req && req->session` to check if the session is
logged in. It is not working anymore and should use `userSession` to
check as other places.

This impacts the timeout value on uploading the tarball, where a logged
in user should have a connection timeout value of 60, but actually it is
15, and thus the upload will fail if it takes more than 15 seconds.

Tested: Without the change, it fails to upload a tarball with 64M and
        times out at 15 seconds.
        With the fix, the upload is successful.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I5e7c9e5d1f4c48ec604afb574ceda9ecc3f1cbc3
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 9ba1601..0f20761 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -676,7 +676,7 @@
 
         std::chrono::seconds timeout(15);
         // allow slow uploads for logged in users
-        bool loggedIn = req && req->session;
+        bool loggedIn = userSession != nullptr;
         if (loggedIn)
         {
             timeout = std::chrono::seconds(60);