Fixed logout problems