Working prototype
Stable version with cookies
All fixed! Works fine