at the ref smiling and laughing with oppo players...
easy solution ...when the final whistle is blown all officials immediately escorted off the pitch....i see no reason whatsoever for all the hand shaking etc anyway.
refs get paid, thats all the "thanks" they need