added logic to retrieve the token and updated icons