Fix public links and add sharing feature

Public links are being generated properly. I'm testing sharing in
client, it's working but not tied to anything yet, just a test.