Implemented proper public key authentication.