Complete state based and state aware OAuth-class.