fix bug in Flask regarding to User.id as mongo ID