Fixing invalid password exception management