Implemented generic JSON RPC API and added login service to it.