fixing pn connection accepted callback timing and adding on message handler to connection