Started refactoring ressources, implemented login