Fixes to prevent teachers using loginas to enter other courses as that student