Chat not updating the User detail when new user logged in

When an new user logged into the same browser and same PC chat widget still keeping the Name email and phone number from old user who logged in before.

The set attributes method not refreshing the name phone with new user details so Agents are confusing to whom they are chatting this leading to sometimes writing wrong name in welcome note and customers are getting Angry especially in EU countries.

Problem with Single Page Applications.

Set attribute or Login method both have same issue