added password checking feature