OAuth lib rewritten to be compatible with ARC