Fix a bug that prevent authenticate method get a token