Update the token after successful connection.

Possible after #401.