add checkPassword method