Add support for connecting and disconnecting networks