Various fixes and changes

Fixed: typo
Added: check for replset cmd-line option and act accordingly
Added: check for authentication results and exit if it fails
Changed: how replset members are matched to the given host