User authentication

User authentication back end is working.
Ready to be pulled, pending code review.
N.B. Login and sign out buttons are part of the login-signout branch rather than the user-authentication branch.
It would be great if this could be unit tested, and e2e tested at some point.