minor fixes and oauth permission tests