LWP is perfect use for web automation. usually for web login, you need to take care the referer/browser user agent/cookie as the web application may check if this is a valid request ( shallow but does work sometimes ). use ethereal to sniff the packet if you can visit from brower but can't with LWP.
for more info on how to do that check out
%perldoc lwpcookbook
and this article on perl.com by Sean M. Burke. I found it's very useful for people who are new to LWP. if you want to get detail on LWP and all the html processing, check his book "Perl & LWP".