refactor and drop the Authentication class

instead add the counter field to the Registration class and
check the counter and return an updated Registration in
doAuthenticate()
test failing authentication due to counter fail