Without seeing the Javascript and the complete page, I can only guess and suggest to use the heavy mallet instead:
Maybe the form fields are just there for show and the Javascript on the page copies the contents of the form fields as they are entered into some JS variables.
One approach would be to make WWW::Mechanize::Chrome send the appropriate control events in the hope that the Javascript picks them up:
my @pre_events = (qw(focus));
my @post_events = (qw(blur));
$mech->field('#username', 'admin', undef, \@pre_events, \@post_events)
+;
$mech->field('#password', '*******', undef, \@pre_events, \@post_event
+s);
$mech->click_button(id => 'loginBtn');
Another possible approach then would be to use the ->sendkeys to "enter" the data into the form fields:
$mech->eval('document.getElementById("username").focus()');
$mech->sendkey(string => 'admin');
$mech->eval('document.getElementById("password").focus()');
$mech->sendkeys(string => '*******');
$mech->click_button(id => 'loginBtn');