added tests, fixed creating accesstoken for tw provider