moving user search js code into script tag

The javascript that displays the users list was outside of the
<script> tag, making the js code itself render on the page instead of
being executed.