Yes, it's a check for the client. M1 is for the server.

It basically means this:
- M1 tells the server that the client knows the password for the user.
- M2 tells the client that the server is the one it expects to be talking to (i.e. no MitM in the key agreement).