Adam's generate session code on both sides