added many error handlings for login and kanguo