Fixed recreation of idMap on recovery, minor login logic.