Depends on how the security is implemented. I think, if it is a .htaccess security schema, you can do something like this:
http://username:password@www.yoursite.com
This also works for ftp sites:
ftp://username:password@ftp.yoursite.com
If it is a different security schema, you will need to research how to interface with it.