Fixed the UI getting into an inconsistent state when logging out
Dropped the Database class for a Settings factory