Login to website and download

hi Dmitry,
I know it’s a bit late, but finally had some time to look at this again…
Thanks for such a extended answer.
However, I do get a code 500…
Just want to be sure, I need to iterate the CSRF token to another module to be able to pass it further. Will it still be in the same run then?

this is how it looks in the header when I am logged in manually:

this is the error that I get:
HTTP/1.1 500 Internal Server Error
transfer-encoding: chunked
x-backend: web02
access-control-allow-origin: *
access-control-allow-headers: *
access-control-request-methods: POST, GET, OPTIONS
x-balancer: lb01
strict-transport-security: max-age=31536000;
Date: Tue, 13 Apr 2021 20:27:29 GMT
Server: nginx
Content-Type: text/html; charset=UTF-8

An Error occurred while handling another error:
yii\base\InvalidRouteException: Unable to resolve the request "site/error". in /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/base/Module.php:543
Stack trace:
#0 /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/web/ErrorHandler.php(109): yii\base\Module->runAction()
#1 /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/base/ErrorHandler.php(135): yii\web\ErrorHandler->renderException()
#2 [internal function]: yii\base\ErrorHandler->handleException()
#3 {main}
Previous exception:
yii\web\BadRequestHttpException: Unable to verify your data submission. in /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/web/Controller.php:216
Stack trace:
#0 /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/base/Controller.php(179): yii\web\Controller->beforeAction()
#1 /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction()
#2 /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction()
#3 /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest()
#4 /mnt/nfs/web/htdocs/abcd/releases/7763/backoffice/web/index.php(12): yii\base\Application->run()
#5 {main}