Add logout handler.