How I can update auth token after user logout and login again?

After user login auth header appends to ongoing requests, but after logout and login token in web sockets link doesn’t reflect updated auth token. How can I properly update it in this case?