Move basic auth check

At the previous point not all apps were initialized. Now the basic auth check happens together at the same location as all others.

Fixes https://github.com/owncloud/core/issues/11129
Merge pull request #11130 from owncloud/moveBasicAuthCheck

Move basic auth check