Use a listener to set ref and accessToken on context. Closes #12.