compute permissions / logged_in status only once in before_request handler and put it into flask.g / flaskg