def logout_then_login(request, login_url=None):
    if not login_url:
        login_url = settings.LOGIN_URL
    return logout(request, login_url)
Logs out the user if he is logged in. Then redirects to the log-in page.
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/auth/views.py/logout_then_login