getCategories from server and send them back