Do not redirect to home when exit is cancelled
Refactor the exit dialog code into reusable element for other uses as well
Ask for confirmation before switching database in either direction.