Refactor code to use OAuthToken more often instead of duplicate functionality

Replaces #280.

@asm89 @XWB @mente What do you think about this approach?