Fix log out bug