The shared factory for user data was created.

I'd suggest creating a service for the logging, because you may want to turn it off at some point. Furthermore, you can use `console.log`, `console.debug`, `console.error`. Feel free to send objects if needed, like the error that occurred.

https://docs.angularjs.org/api/ng/service/$log