Update the token after successful connection.