Fix behavior of cancelling the name cred. dialog.

The code used to trying to store the credential even when the user
cancels the dialog. Fixed in this CL.
1 file changed