added authentication functionality

Hacked authentication functionality into rpc_client class.
 Is usable over supervisor config.