adding mongodb and duplicate user validation.