app_terminal.py:  Fixed a transient AttributeError exception that could occur inside `TerminalApplication.on_close()` when a user reloads the page before the authentication process is complete.
app_terminal.py:  Fixed a bug where generating a new 50terminal.conf wasn't working properly.