implement user configurable baudrate
also fix minor connection loop