diff --git a/www/js/services/wallet-services.js b/www/js/services/wallet-services.js
index 8d11e7141fd4e1145a09c04915c61115a6139374..ce29d15b1585cdfa37a3b6cb2e07b327e2d7333f 100644
--- a/www/js/services/wallet-services.js
+++ b/www/js/services/wallet-services.js
@@ -167,7 +167,7 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
 
           authData = res;
           data.pubkey = authData.pubkey;
-          data.uid = authData.uid || undefined;
+          data.uid = authData.uid || data.uid;
           data.isNew = options && angular.isDefined(options.isNew) ? options.isNew : data.isNew;
           if (keepAuth) {
             data.keypair = authData.keypair || {