Added logout handler