Somehow the MediaWiki cookies are not being passed to the session. First let’s see if they’re set during login. In ApiClient::login() add the following line immediately before the return:
var_dump($this->session->cookies);exit;
Log in to Scripto and what do you see? If you see anything other than cookie data, then MediaWiki isn’t passing cookies to Scripto’s HTTP client.
Now, let’s see if the session contains the cookies after logging in. Log into Scripto, and then in ApiClient::__construct() add the following line immediately before the return:
var_dump($this->session->cookies);exit;
Refresh the page and what do you see? If you see anything other than cookie data, the session is failing to store cookies for some reason. If so, have you customized your Omeka S session configuration in any way?