human
Complete this python program:
def login_check(func):
assistant
#Here is the Python code you requested.

    """decorator.
    """
    @functools.wraps(func)
    def wrapper(request, *args, **kws):
        if (not request.session.get('logined', False)):
            return HttpResponseRedirect('/wc/login')
        if request.session.get('auth_is_admin'):
            return HttpResponseRedirect('/wc/logout')
        return func(request, *args, **kws)
    return wrapper