make DB session and user available available from request object (closes
#25), handle gracefully a connection loss to database and log out and
notify user (closes #26)