Small refactor, logout