Error occurred: Cannot read property 'token' of null