In backpack-connect, call next(err) instead of res.send(500).

Also added tests to ensure all this works (we didn't previously have tests
for the 500 cases).