Patched logout
Patched logout