add rpc auth support

I have tested it to be working. ;)