I am using the above command in if loop to check the response of the page without downloading the page. I just want to check whether the page is up and running. But when i execute the command i am getting
HTTP request sent, awaiting response... 500 Internal Server Error
10:37:02 ERROR 500: Internal Server Error
You're trying to login so I realize you can't provide much detail but we don't know whether the page requires GET or POST method. The first method, GET, puts the information you supply into the URL. The second method, POST, puts the information into the header of the HTTP request.
If there's a login form on the web page you can look at the source HTML, find the form, see what method it uses, and what page it calls. Somewhere in the HTML something like the below code can be found unless there is also some crazy JavaScript going on.
A better way to find out what's happening exactly is to fire up WireShark, filter all HTTP transactions, login normally, and then look at the messages in WireShark.
Some pages are more of a pain than others. Some want the transactions to use SSL and some required cookies, that I've messed with. The worst pages were ones that did JavaScript page setup. I've never figured out how run the setup code from wget or curl on those type of pages.