Implement some session module code.