def logout
      handler = proc do
        if response.code == 204
          clear_session
        else
          case response.code
          when 401 then
            raise Jiralicious::NotLoggedIn, "Not logged in"
          else
            # Give Net::HTTP reason
            raise Jiralicious::JiraError, response
          end
        end
      end

      request(:delete, "/rest/auth/latest/session", handler: handler)
    end
def logout
      handler = proc do
        if response.code == 204
          clear_session
        else
          case response.code
          when 401 then
            raise Jiralicious::NotLoggedIn, "Not logged in"
          else
            # Give Net::HTTP reason
            raise Jiralicious::JiraError, response
          end
        end
      end

      request(:delete, "/rest/auth/latest/session", handler: handler)
    end
Logs out of the API