solve logout problem