Initial working code for closing notes using authentication.
Other network operations are definitely broken right now. More fixes coming