initialize the session earlier
Merge pull request #3560 from owncloud/init-order-session

initialize the session earlier