logout fn compile error fix