Update 6 points given in description below:

1. COMMAND_WORD is JUST the word for the command.
2. In Steps 3-4 changed the response to SYNTAX_ERROR.
3. Assured that cm.getParameters() isn't null before trying to call .get(0) on it.
4.Changed code in getRequiredParameterNames(); now similar to JoinSession same-sign. method.
5. added change in state to WAITING_FOR_USERNAME in case where userManager.loginUser() is null.
6. On successful login called protocol.setUser(user) and set new username and password in user metadata.