USD 4.0 is not saving credentials used in logging to CRM when you first open USD. Every time I open USD, it will ask me to login every time. I don't have this issue when I was still using USD 2.2.
I checked the logs and I got this:
Microsoft.Xrm.Tooling.CrmConnectControl Information 8 10/15/2018 12:14:45 PM Created CrmConnectionManager
Microsoft.Xrm.Tooling.CrmConnectControl Verbose 16 10/15/2018 12:14:45 PM Error Message: Failed to get credentials from Windows Vault
Source : Microsoft.Xrm.Tooling.CrmConnectControl
Method : ReadCredentials
Date : 10/15/2018
Time : 12:14:45 PM
Error : Failed to read the saved credentials.
Stack Trace : at Microsoft.Xrm.Tooling.CrmConnectControl.Utility.CredentialManager.ReadCredentials(String target)
at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.LoadConfigFromFile(Boolean readLocalFirst)