join button functionality