Added `checkAuthorization` support, added some basic tests, other small stuff