Hooking up num_bad_pin to API, adding pick warning and logout warning on failed attempts