Added session handling.