Fixed #15619 – Added CSRF protection in the logout view.

Logout is now performed only for POST requests.
GET requests return confirmation page.

Based on patches from ashchristopher and vzima.