Fixed logging and connect message. Added javax.json for message building.