Updated client2 with session establishment