"i have checked for form number using $mech->forms() which displays nothing."
There is no action for the <form> that you're showing us (without which it can't "do" anything, nor does <input type="button" value="Login" class="loginBoxTextStyle" onclick="return savesettings();"/> clarify much other than to make it clear you're dealing with a js function.
Is it possible that the page is broken (even when visited with your browser), or that you missed something in the .html?
Update: "can't" above is badly stated; even without an action, use of <form> and subordinate elements will effect rendering. But worse, even though the OP's code update made it clear (duh! even to me!) that the issue was at least in part a js issue, I didn't consider that in the flat "can't." Bah! And apologies for careless thought.
However, parv's question below about the default action (when none is specified) sent me checking the w3c's html 4.01 specification. I may still have missed something, and, as always, it's well to remember that browser-writers sometimes :-) build browsers that are not fully conformant.
Nonetheless, what follows is what I found:
%attrs; -- %coreattrs, %i18n, %events --
action %URI; #REQUIRED -- server-side form handler --
onsubmit %Script; #IMPLIED -- the form was submitted --
action = uri CT
This attribute specifies a form processing agent. User agent behavior for a value other than an HTTP URI is undefined.