Incorpoarated random timing on code entry from Jeff.
Fixed image to handle invalid code detection.
Added support for detection of expired temporary code.