Make sure the email address is focused when the dialog starts up.

* The input element was not being focused because we prematurely said that the dialog was in the enterEmailState.
* Fix the failing QUnit test when it is run in isolation.

fixes #3424