logout patch