implementation of internal and external password