Added basic support for sessions.