Display user badges in search and close modal on click outside (#382)