Patch 1: Password aurthentication 

File is written in c++ 11.
To compile write: g++ password_authentication.cpp -std=c++11