HTTP In node: Check credentials exist before using