Loginredirect

Please review and merge this, I have tested the login using both teacher and student. it is going to route correctly.