Fixing Issue #1 (Changed error to loginError)