Ajax response returns html code instead of user data

You could replace your call to wp_ajax for a custom REST endpoint.

This should be useful: https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/