Removed invalid characters in the generateRandomToken function