I don’t recommend using a username (login name) in a URL like that because it can be considered personally identifiable information. Meaning it can violate privacy laws.
For example, if your site is using Google Analytics, those URLs would be stored on Google’s servers which would violate Google privacy terms.
If you’re creating some sort of membership page, I would look at some of the well-established plugins that do that for you.
Please do a search on WordPress membership plugins.