slightly better test, might want an AuthError exception class?