Add progress bar to lougout dialog and make the timeout configurable