Change the way of login(running on the thread)