Tweaked how token is configured and sorted out logging.