I don't know of a way via lynx, but there's a few things you could attempt with curl or elinks, depending on the configuration of the login page.
If it's just basic proxy authentication, you can try passing the username and password via curl:
curl -u username:password http://example.com
You can also use curl to do more complicated logins, storing session cookies and such. Check out "Using cURL to automate HTTP jobs"
Finally, you may be able to do this in a dirty way using ELinks. ELinks has a function to save a username and password, and also a command line switch to automatically submit a form. By combining the two, this may be what you need:
Enable password saving in elinks.conf by adding this line:
set document.browse.forms.auto_submit = 1
Then run the command to automatically submit the first form on a webpage:
elinks http://example.com/login -auto-submit 1
The problem then is quitting elinks, you may have to kill it in your script.
Good luck.