bug fix in log out