Move checkpassword to scripts