Fixed bug by saving tokens correctly