Added login functionality, fixed handshake to get certificates that authenticate the two parties