#488 Serveral changes to adapt oauth to our system. Ongoing work.