Moved user database managment to a new UserDatabase class