routing to ldap_authenticate function, trying to get it to return status codes