Implemented the remaining APIs required for GDM.

GDM doesn't work yet and I'm pretty sure the daemon leaks a lot of memory.