Put controller logic into User model and removed unnecessary and redundant logic from StudyGroup and Course models