Implement Auth and Apps management

*WIP*: I'm going to add some tests to it.