refactor session client from nakama to matrix