finish login judge
finish it, but need more test