···1212 // FIX: requires backend to return 401 when not logged in (currently returns 200 even if not logged in)
1313 if (!response.ok) throw new Error(`HTTP ${response.status}`);
1414 const html = await response.text();
1515- const match = html.match(/(\d+)/);
1515+ const match = html.match(/>(\d+\+?)</);
1616 return match ? parseInt(match[1], 10) : 0;
1717};