Fixed memory leaks, added krb5 replay cache. Now I need to add code to check