Added logic to search for users