In my base controller under the line
parent::initController($request, $response, $logger); I added this other:
$session = \Config\Services:

ession($config)
However Im trying to use flash data in my login controller and Im getting the following error:
Call to a member function setFlashdata() on null
It looks that what I did was not enough to have session autoloaded in every controller. What am I missing?