update references
require SAM; handle null redirect URL
add convenience ctor
add helper to register custom oauth callback