I'd say do what @StevenV said and try to encode the credentials in the URI.
If that doesn't work or you don't want to use that method you have to use the POCO HTTPClientSession class instead. Something like this:
URI uri(url);
HTTPClientSession session(uri.getHost(), uri.getPort());
HTTPRequest req(HTTPRequest::HTTP_GET, uri.getPathEtc(), HTTPMessage::HTTP_1_1);
HTTPBasicCredentials creds("username","password");
creds.authenticate(req);
session.sendRequest(req);
HttpResponse resp;
std::istream file = session.reveiveResponse(resp);
if(resp.getStatus() == HTTP_OK){
//copy image from istream file here;
}