added handling of post messages sent to server