Added ability to update the login from the API (issue #2369)