Improve the User model structure, now permissions aren't stored in the database but generated on the fly - still needs more work before auth works properly