Updated database class with user actions