In my case I have just modify the "rememberme" cookie and replace the username by the email like this:
if(userJustLogin) {
// decode cookie
$request = $this->getRequest();
$cookies = $request->cookies->all();
$cookieParts = explode(':', base64_decode($cookies["REMEMBERME"]));
// replace username by email and update hash
list($class, $username, $expires, $hash) = $cookieParts;
$cookieParts[1] = base64_encode($user->getMail());
$cookieParts[3] = hash_hmac('sha256', $class.$user->getMail().$expires.$user->getPassword(), 'YourSecretTokenFromParameters.yml');
// reencode cookie
$cookies["REMEMBERME"] = base64_encode(implode(':', $cookieParts));
$cookie = new Cookie('REMEMBERME', $cookies["REMEMBERME"], $expires);
// send new cookie
$response = new Response();
$response->headers->setCookie($cookie);
$response->send();
}