Better JSON RPC error handling
Added some client management RPC methods