Add oauth and environment checks

Issues #4 and #5