The method RocketChatClientCallBuilder.login in master branch is using username field to set the username value but the API is expecting user instead.
By using username the response is always 401 Unauthorized (other endpoints are already accepting username so my understanding is this field name should be standardised).