fix bug and add get_token