add session lifecycle into functions.tex