Clear session before setup

Fixes https://github.com/owncloud/core/issues/11861