Integrating `flask_login` to get login/logout and login_required views working.