1. Students are not allowed to use others account
You'd be hard pressed to force the students to not share authentication credentials with each other, unless you go with something like biometrics. Even physical tokens can be passed from one person to another. Alas, you essentially cannot guarantee this.
2. I need to make sure all of them logged in
You can make sure that each account was logged in to using something like
last -n1 | grep 'still logged in'. Process accounting might also be a workable approach, depending on what your specific needs are.
3. They need to get access to the shell only
That wouldn't be particularly useful, since it implies that they cannot do something as trivial as getting a directory listing (
/bin/ls), an editor, writing text to a file (
/bin/cat - > filename), try their solutions at the programming assignments you give them (which implies executing an interpreter, or a compiler, linker and the final executable).
What about your environment precludes the possibility of just giving each student a normal user account with access to standard tools? If you don't want a GUI on the system, you can either choose to not install X, or provide only unprivileged SSH access with X forwarding disabled. But if your goal is to restrict e.g. web access, do note that there are quite a few text-based web browsers available, and if sufficiently motivated, one can bootstrap such a process using relatively trivial software using readily available (and often required) modules.