Added support to properly validate passwords