added category and a few changes to stricten the loading of user data (untested)