This patch adds logic to check if the token is about to expire and refreshes it. Signed-off-by: yolossn <nssvlr@gmail.com>