LightDM: "Failed during authentication"

Solution 1:

There's a file named .Xauthority in home directory. Changing the owner and group of this file from root to user, and changing the permissions to 664 solved the problem.