Force all users to choose the same library, for testing purposes

This replaces an earlier JS solution to the same problem.
Use the realm from the session when logging in
Improvements to the login procedures

Enable login on /log/in again.