change place from auth_failed hook is run
small performance improvements in jlib