Some refactoring + fix for edx.org login.
Merge branch 'master' of https://github.com/nonsleepr/edu_10gen_dl