Connection using menu and not cli

This contains a few patches which allow connecting using menu.