use accessor to get session
Merge pull request #1856 from owncloud/kill_oc_session

use accessor to get session