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 
Yep. This now happens before the call of `handleLogin`: https://github.com/owncloud/core/pull/11130/files#diff-3267a2e9d16decfe96b1574917f584dbL742