Various fixes to client to prevent infinitie logon loop, connection status not being updated on error.
Fix NPE on logon/reset when no state is available.
In AuthenticationRequiredResult return lastResultSuccessfull boolean so client can track failures.
Merge branch 'develop' into ticket_327