Update idp.py

Fix enrollment bug.