use passlib in most cases
adapt to new import format