refactor new account dialog