ui/preferences: rework connection settings

Fixes #5