fix database access; fix UserMapper bug