Fixed apparent logout bug