quaternion viewing problem

I’d like to use a quaternion for viewing, but there’s a problem: I use 2 points on a sphere to calculate the axis and angle of rotation, then put these into a quaternion and multiply by the old quaternion. I then convert the product into a matrix and load it into GL. The problem:

say I rotate the z axis; the x and y axes will follow and stay orthogonal to it after rotation, but there is an additional angle I can rotate those 2 axes around the new z axis proper. Do you do this in your code? How? I see no way to do this using a single quaternion multiplication, but with 2 muls, I think it would be doable.