Separated Teacher and Student client-side login logic