Fixed logout bug