More Federation & LDAP fixes