Adding logout handler