moved getAccessToken to APIController
testAccessToken moved to APIController
errors made optional