How to test my API that requires a login and password with Node or javascript

I am trying to use request.js; unirest; or frisby.js to run browser-less API test that require secure login with UserName and Password.

When I inspect the network with Firebug, I notice that there are two gets:

One that looks like this: https://my.web.client/

and then one that looks like this:

https://my.web.client/Login/LogIn?ReturnUrl=%2fmy.web.client%2f"

We I GET the first url I get back HTML stuff...W What do you recommend that I need to do in order to send a username and password to log in to the site and capture the cookie?

Thanks