fix ajax lookup for users and groups fixes #1568, thanks @garnertb