logout fn compile error fix2