I assume you send the check loginname? yes this only checks for the loginname of the user. if you like to do something else, you can search for a user first, e.g phone, email, etc.
Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination.