fix register and add token