Small hacks initiated
added stuff to bypass exception caused by pubkey auth
Added debug logging
minor changes