Refactored books controller

That's the same reaction i had when i re-read this :)
Indeed this is poorly designed and I intended to rewrite this better when I add a JS framework like angular, or perhaps find a different way of getting what is intended with the resources the current app has.
For now and for this branch's purpose (which is extracting responsibilities from the User controller) let's leave it like this.