Added session logic.