Fixed logout problem