fix network on main thread issue of login