Ensure UI is password viewer is updated after closing password dialog
And add some unit tests for editing a password entry