https://sourceforge.net/p/openimscore/code/HEAD/tree/FHoSS/trunk/src/de/fhg/fokus/hss/cx/op/SAR.java#l551 sets the user to Not_Registered state if it has only one IMPI_IMPU pair registered with it. This is wrong - per TS 29.228 on HSS behaviour, AUTHENTICATION_FAILURE and AUTHENTICATION_TIMEOUT should only reset the Auth_Pending flag, not change registration state.