moving onrefresh handling to refreshToken method