handling game messages in browser