adds join session function