Fixes #7369 - External user groups update on login

This forces external user groups associated to the auth source of the user logging in to update, so that users get their external permissions updated on login.
Also there are a few unit tests that were large and I tried to tidy that up.
This will force login and password that is used during login but auth source may have explicit account to use for sync. In case where user does not have permissions he receives error "Insufficient Privileges to query groups data" upon login.