Realm web local storage issue when logout then login

Hello,

I have an issue when trying to login twice to my app using realm-web
To reproduce the issue you have to login once , then log out then login again. (you can use the codesandbox link below to see the error)
By doing so i get the following error :

Error: Request failed (POST https://eu-central-1.aws.services.cloud.mongodb.com/api/client/v2.0/auth/session): token contains an invalid number of segments (status 401)
at MongoDBRealmError.fromRequestAndResponse (MongoDBRealmError.ts:75:1)
at async Fetcher.fetch (Fetcher.ts:239:1)
at async Fetcher.fetchJSON (Fetcher.ts:277:1)
at async User.refreshAccessToken (User.ts:297:1)
at async Fetcher.fetch (Fetcher.ts:248:1)
at async Fetcher.fetchJSON (Fetcher.ts:277:1)
at async User.refreshProfile (User.ts:243:1)
at async App.logIn (App.ts:212:1)
at async loginAnonymous (useRealm.js:58:1)

Here is my code to reproduce the issue :
version
“realm-web”: “2.0.1”
https://codesandbox.io/p/sandbox/pedantic-buck-gnqyg8

Here is a working version. in 0.8.1 i dont have the same behavior
version
“realm-web”: “0.8.1”
https://codesandbox.io/p/sandbox/vigorous-hoover-pw6hmp

Can you help me to fix this issue please?

Best regards