added deregister callback
added delay to session loop