fixed two bugs on deciding login button clicking correctness.