add API doc generation stuff
add some tests for refresh tokens