Put controller logic into User model

removed unnecessary and redundant logic from StudyGroup and Course models
All unit tests pass