Refactoring the application to granular modules

I problably broke the authentication and the database configuration.
Just enjoy it, I'll text and fix soon.