Added memcache and better user login practices

I added helper function to retrieve UserData and CourseData
appropriately.  This includes using memcache.