reorder session check in execute to allow lazy connect