fix bug of login, joinnetwork, re-send code