def fq_logged_in():
    """Returns true if the user is logged in"""
        
    if 'session_key' in session:
        collection = mongodb_get_users()
        user = collection.find_one({'session_key': unicode(session['session_key']) })
        if user:
            fq.access_token = user['access_token']
            return True
    return False
dataset/ETHPy150Open finnp/squarewheel/squarewheel.py/fq_logged_in/original