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

@PVince81 
What happened to this `loadApps()` call, not needed any more ?