Pulled common code out of authorisers into Twitter