Simple password checker
optimized