password prompt logic