Move to database token system, to avoid reusing connections across threads