Fixed a bug where wrong indexes on the tokens table were preventing user tokens from being saved