changes to UserDao, bug fixes