send secret token to server to stop people spamming my API endpoint. Fix some type conversion errors.