Add register request handling
Add register request in client.

But the client still has bug.
Change db module to use connection pool.