how does password work?