Fixed token not saving properly