- add support for logging out
- avoid flashing