Implementation of client authentication.
Merge remote-tracking branch 'origin/master'