Fix bug that can't authenticate user