Yes it's legal to have somebody else on board while slinging at least here in Canada.
what we do is this, both pilot can't be flying at the same time, so let say 1 hour of flying is done, if one guy flies 45 min and the other 15 min, they both log their respective time and both names gets in the journey log, one line, 2 names and 1.0 hr flight time.
JD