Introduce back-end view logic for logging in users

This affects mainly the authn subscriber, the account view and their tests. It also introduces new dependencies in the form of passlib, py-bcrypt and mock.