Added session check for modal