logOut function working hard