Fixed issue that caused first-time authentication to fail.