Adds session handling.