auth.py:  Fixed a bug where `require()` was using the old 'ws_connection' attribute instead of just 'ws' (when trying to send the client messages).
app_terminal.py:  Fixed a bug where `TerminalApplication.term_ended()` would raise a KeyError exception if a terminal was closed before it finished opening (e.g. policy denial).