Load LDAP groups for API token authenticated users
When users are authenticated with an API token not all permissions where
assigned to the session because the LDAP group memberships where not
Now the information is loaded from the directory if the user is found.
If not the local group memberships are used.