fixing logout capture