added realm in options array. set username/password in constructor