Made teacher/student check more thorough in index. Fixed some redirect issues.