authentication & HTLoadAnchorToChunk

Using w3c as a basis, it looks like client authentication
is ultimately handled by the functions in HTAABrow.c.
Is there a way to handle authentication automatically
(i.e., store the username & password as (const char *)
and hack the appropriate HTAltertCallback function
to pass them back to the server)?

It appears that trivial initialization of the library
and using HTLoadAnchorToChunk will not work when dealing
with a URL that is actually a cgi executing on the server...
(I'm really pretty clueless here...).  Is there a way
to get responses into a character array instead of a file
stream (e.g., stdout) under these circumstances?

THanks.	-John