code: def logout(self):
          
          if current_user.is_authenticated:
              self.security_service.logout_user()
  
          if request.is_json:
              return '', HTTPStatus.NO_CONTENT
  
          self.flash(_('flask_unchained.bundles.security:flash.logout'),
                     category='success')
          return self.redirect('SECURITY_POST_LOGOUT_REDIRECT_ENDPOINT')
docs: View function to log a user out. Supports html and json requests.