added functionality for closing the dialog after adding credentials to database,
toast message to confirm to user that credentials were added.