Code review for dashboard and close-window logging.
There are some errors in the JavaScript ...
See comments preceeded by BvdS.
I did not review changes in the tests directory; they
may be obsolete since Haoxuan has changed
the test setup.