def remove_dupes(my_list):
    """ Function to remove duplicates from a list
    """
    temp_list = []
    for x in my_list:
        if 'logout' in x:
            break
        if x not in temp_list:
            temp_list.append(x)
    return temp_list