refactored login/register, refactored user model, implemented RBAC system