Initial upgrade using composer, phpunit and many SOLID concepts

Hey there,

I really like your project and the reason i'm suggesting this pull request here is i see you have potential, mostly around front-end and your project is really inspiring me! But, sadly, your backend is messy... You might consider it non-cluttered but it is actually very messy and cluttered.

This pull request is a simple and working upgrade to your current system. It favors SOLID principles by creating many small objects such as Models, Factories, Repositories, Builders, etc. You might find it "cluttery" but it is a good base for a solid foundation for your software. 

To aleviate the changes, i installed a much required composer.json file, it will allow you to get many dependencies into the software and not have to recode what other people have already done. In the dependencies, i have installed the popular Laravel Illuminate Container component, it allows easy inversion of control.

I also have changed your Authenticator class to use my User package in general, take a look at it for more information on what i did. At first glance, it doesn't seem like i did much work but it's a highly recommended rework before you get too far into your software.

Finaly, i have also created some unit tests, but there is still a lot of work to do on that part because my objects are still not the best since i didn't use a tried and tested query builder. Therefore, the Repositories are not tested adequately and the Authenticator class does too much and violates the SRP principles.

If you accept this pull request, i will rework many other aspects in smaller increments, this is a big push, shouldn't break your actual software. If you refuse it, fine by me, i'll have lost 8h of my time but i loved every minute of it!

Good luck, i hope you'll accept this PR.