Ok, I figured out a way to do the login with a perl script. All I did was call a script that created a redirect through http-equiv to
http://username
assword@mysite.com. Seems to work great, only issue is that if you try to reauthenticate with bogus information, it keeps the previous authentication, which leads to my next problem.
I now need to figure out a way to do a logout of an htaccess protected file after being authenticated. I tried writing a script that forces a bogus authentication, this didn't seem to work, even though it did work when done through the browser window.