Get TLS prompt working for Accounts dialog, refactoring of
validation routines