complete session functionality