Auto refresh access token; Fixed minor bugs