I finally found the solution. It was simply due to the browser which allow cookies only on domain, not 127.0.0.1
So, replace this line
$client = static::createPantherClient(['port'=>8080]);
By that one
$client = static::createPantherClient(['hostname'=>'localhost', 'port'=>8080]);