fix bugs jpa part and sessions. fix bugs in flash method. Add function send and listen message to/from Nodes.