adding reauthenticate method to client.rb