Bug/ldap fixes

A minor change which tests if a couple of ldap params are actually set before trying to assign them. Fixes the login bug for temp staff.