This function logs the user out. It will never return. By default, it will cause a redirect to the current page
after logging the user out, but a different URL can be given with the $params parameter.
Generic parameters are:
- 'ReturnTo': The URL the user should be returned to after logout.
- 'ReturnCallback': The function that should be called after logout.
- 'ReturnStateParam': The parameter we should return the state in when redirecting.
- 'ReturnStateStage': The stage the state array should be saved with.