Added refreshToken function
Updated makeApiRequest function