     //  Override and return a user to be stored on session.myUser
     override func user(withUserId userId: String) -> MXUser? {
         if userId == credentials.userId {
+            //  if myUser is set, return that
+            if let myUser = myUser {
+                return myUser
+            }
             return MXMyUser(userId: userId)
         }
         return MXUser(userId: userId)

            //  load real eventStreamToken
            fileStore.loadMetaData()
        }
    }
    
    //  Return real eventStreamToken, to be able to launch a meaningful background sync

    private var credentials: MXCredentials
    //  real store
    private var fileStore: MXFileStore!
    private var myUser: MXMyUser?
    
    init(withCredentials credentials: MXCredentials) {
        self.credentials = credentials
