If I was to use the following in my Jinja template:
{% set data['enabled'] = True %}
TemplateSyntaxError: expected token '=', got '['
Jinja2 tries to limit assignments in its code, to remove the logic from the view (check out an MVC explanation).
If you still want to do an assignment you will have to use update with a do block. For this you have to enable Expression Statements. After that you can try something like this:
{% do session.update({'logged_in':'True'}) %}