def is_logged_in(soup):
    """ checks from code snippet whether user is logged in
        phpbb signatures
        Not Logged in 
        <a href="./ucp.php?mode=login" title="Anmelden" accesskey="x" role="menuitem">
            <i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>_log on message_</span>
        </a>
        Logged in 
        <a accesskey="x" href="./ucp.php?mode=logout&amp;sid=__sid__" role="menuitem" title="log off message">
        <i aria-hidden="true" class="icon fa-power-off fa-fw"></i><span>_log off message_</span>
        </a>    
    """
    logged_in = False
    login_link = soup.findAll("a",{"accesskey":"x"})
    if len(login_link) > 0:     
        link = login_link[0].attrs['href']        
        if link.find("logout") > 0:
            logged_in = True
    return logged_in