Add API endpoint for logging out.