fix logout with counter