fix #2, TypeError: Cannot read property authenticate of undefined