restored update_principal_json oid
minor improvements and fixes
Changed the order of authentication steps in beehub_run.php,
username/passwd is checked first, then SAML is tried.