client auth code implemented

not the nicest in the world and this RSA code is dog slow but it works