You can not modify username as it is unique identifier for user. However You can use attribute firstName/lastName of user profile which can be modified.
Another alternate is to use email Id/password for authentication instead of username/password. Since you can modify emailId of user, this will solve your purpose. See this for details.
Let me know if it is helpful.