Add password authentication validation and associated rspec tests.