Add Fragment support

This commit adds support for calling authorize from a Fragment. Now the
Fragment's onActivityResult will be called.