move the code that we call when we have a valid card code to it's own function.

tidy things up a bit

timeout adding a new card rather than waiting for ever.

handle led's a bit better.