use dict instead of set as set cannot be encoded as JSON

flask-login changes the session encoding from pickle to JSON.  Sets cannot be encoded with JSON so use a dictionary instead.