in reply to WWW:::Mechanize and credentials

The credentials method expects four parameters:

    $ua->credentials( $netloc, $realm, $uname, $pass )

Also, your $netloc doesn't match the netloc in the URL. WWW::Mechanize (aka the underlying LWP::UserAgent) will only send the credentials if both netlocs are matching.