manage exception when querying counters.
Reorganise counter query code
throw login exception if login failed
est : update counter when taping the update button