fixing the problem with logout