fixed a bug when using ajax logout menu