Implemented proper client login and disconnect.
Fixed handle_new_client resetting slot.index.