Solving uncaught exception during unauthorized central server access

This solves issue #300.  Please visit there for step-by-step reproduction.

Here, I've made the one-line-change to avoid the error, and implemented an automated browser-based regression test.