How to use cookie in phonegap interact with nodejs server?

I write a application (social network like twitter) and first thing I write is login function.

In server side I use nodejs expressjs mongoose to create restful webservice handle request but I dont know when user login (from android application) how to save the cookie to this device and after that if they already logged in how to check them first before they can post a tweet or comment, I wanna know about how to save cookie or something like that and how to check it already login or not before send post get put request to server.

My ideal is : in android app (phonegap) send encrypt(user+pass+secretkey) and server respone json message success or fail

I dont know how it work. Can you explain it to me? Thank in advance!

learn more about what sessions and cookies are and use http://passportjs.org/ for easy authentication