added some routes to the phpapi and functions to user and tutor models