add refactoring and saving accessToken to the session