I already found a solution for my case. I edited /program/include/rcmail_output_json.php and added the username variable on line 49:
Before:
$name = $this->config->get('product_name');
After:
$name = $_SESSION['username'] .' :: '. $this->config->get('product_name');
Apparently, if it is changed by javascript it uses this file somehow...
It would be nice to have this option out of the box. Or perhaps someone make a plugin.
Greetings.