Make backend.js really sync

However, we mimic the async behavior, so we can pass the caller the
exception, which in turn allows the caller to take decisions.
readStudentInfo: fix incorrect internalError invocation

In the place in which we invoked internalError, the request and
the response were not defined.

Use callback("json error") instead.
backend.js: cosmetic changes
login.js: factor code to authenticate

While there, remove stale comment.
backend: correctly deal with new/updated studentsInfo
Merge branch 'develop'