Improve shutdown interface

Add shutdown dialog and shutdown countdown.