local sessions={}
session={}
function session.Start()
	if(sessions[cookie.Get("SESSID")]) then
		SESSION=sessions[cookie.Get("SESSID")]
		return
	end
	math.randomseed(os.time())
	local parts=string.split(REQUEST.IP,".")
	local hash=""
	for k,v in pairs(parts) do
		hash=hash..BaseEncode(tonumber(v) or 0,16)
	end
	for i=1,10 do
		hash=hash..BaseEncode(math.random(0,255),16)
	end
	SESSION={}
	sessions[hash]=SESSION
	cookie.Set("SESSID",hash)
end
--Recommended to be called in case session isn't cleared!
function session.End()
	SESSION=nil
end
function session.Clear()
	sessions[cookie.Get("SESSID")]=nil
	cookie.Delete("SESSID")
	SESSION=nil
end