Cont.(updated session and template utils)

Todo: follow the previous comment.