I cannot log in due to changed keyboard layout
Method 1: Go into the Guest User(if it is there) and change the language.

Method 2: See Mac os X - locked outside my account (language!).

Method 3: Try booting into recovey mode(holding cmd+R at boot). Then you should be able to change the keyboard layout(in the menu bar).

Method 4: See https://superuser.com/q/871277.