PTFM-12580 dx login improvements

- Allow up to 3 login retries
- Re-query username on empty input
- Cache username and password upon otp required message (which indicates username and password match)
- Produce a more specific error on otp mismatch
- Introduce a test case (disabled by default)

@kjlai to review