Finish routes, user model and refactor tests