You should click the button, rather than submitting the form, so I suggest:
$ua->field('ctl00$MainPlaceHolder$usernameText' => $username);
$ua->field('ctl00$MainPlaceHolder$passwordText' => $password);
$ua->click;
WWW::Mechanize handles cookies just fine by default, so there is no need to do $ua->cookie_jar({});