fix bugs in log in