Refactored the code and updated the Token refresh code to call it on the AsyncTasks