Cleaned some code. Validated the users in order to avoid duplications.