Figured out what the bug with refreshing access token was. Phew.