Bug fixed in saving cretentials as a JSON saved
, set 'username' attribute instead of 'user'