Fixed a couple of bugs in username detection. Modified detection for when the user is logged-in. No more waiting for docuement state to become COMPLETE during LO detection. If it is INTERACTIVE that is enough