def user_auth_check(login_session):
    """
    checks whether a user is logged in or not.
    :param login_session:
    :return:
    """

    user = {}

    try:
        user['email'] = login_session['user_email']
        user['id'] = login_session['user_id']

    except KeyError:
        user = False

    return user