Adding an error dialog and related code.

* Add Utils.once which is a one time event handler.