Add support for logical operator (AND/OR)

/to @ritch 

There are corresponding PRs for each of the connectors.