use a python var to determine whether user is authenticated