support password option in constructor