added password validation and authentication tests