improve the way of passing the auth token to js
use http-request lib instead of raw HttpURLConnection