1. changing auth token to use user id instead of username
2. add fall back checking for old url
3. remove yui functionality to generate calendar url
4. add missing variable
5. fixed usercontext instance
At the same time this commit introduces a standardised dialogue YUI module to enrol and implements it across the board.
This commit also addresses MDL-23292 and MDL-23319.