Bug fixes for inheritance hierarchy.

Implement the login thread.