improve #322 so we store previous values of user/pwd/port so they are reused