Improve credentials sync between desktop app and server app

Being logged into the server app with different credentials than what’s logged into desktop app causes issue during authentication.