improved user model and controller