Big refactor of backend code
Add some TODO to auth file