in reply to http digest auth

Try adding this:
$mech->credentials($username, $password)