!7
p {
serveHttpAndOpenBrowser();
}
html {
S cookie = serveHttp_cookieHandling();
S url = "/";
S pw = params.get("pw");
print("cookie=" + cookie + ", pw=" + pw);
Pair p = standaloneWebAuth(url, cookie, pw);
print("result: " + sfu(p));
if (nempty(p.a)) ret p.a;
if (nempty(params.get("showform"))) ret standaloneWebAuth_showForm(url, cookie);
ret p.b ? p("Authed")
: p("Not authed") + standaloneWebAuth_showForm(url, cookie);
}