Serverside API for enrollment

This cleans up the API for getting which alternative a user is part of from python code.