Fixed connection problems

Added serialization for EventManager and Client classes; Changed tcp to
http