added password check routine