Hi Julie,
If it is basic HTTP authentication, you can pass the arguments to URL.download():
from pattern.web import URL
print URL("http://...").download(authentication=(username, password))
If you need to fill in an actual login form it's more complex, since it may or may not involve cookies etc. You can try to locate the login request in the source HTML and send it by post-method:
from pattern.web import URL, POST
URL("
http://domain.com?login", query={"username_fieldname": username, "password_fieldname": password}, method=POST).open()
But the chance that this will actually work is quite small I think..
I haven't looked at this kind of situation yet. Let me know how it goes so we can learn from it.
Best,
Tom