def logged_in(session):
    """Checks that the user is logged in within the session.

    :param session: http session
    :type session: aiohttp.ClientSession
    :return: True if user is logged in else False
    :rtype: bool
    """
    return 'csrftoken' in session.cookie_jar.filter_cookies(
        'https://users.premierleague.com/')
