in reply to LWP and j_security_check form-based login?

Try adding a line that sets the content-type.
$req->content_type('application/x-www-form-urlencoded');