fix logout problem