Added PM and custom logging

the module now allows you to PM users more simply with the PM method. It
also allows you to attach your own custom logging function.
Minor bug fixes.