Add Yggdrasil login, add state to client, preliminary work for protocol fixing