support for rpc secret option, thanks @zumoshi