Moving more function towards client-server mode.

Phasing out the local database. Now registration list of a teach lesson
works.
More client-server logic. Operations on teach lessons is now fully on
server. Add lesson registration is on server as well.