If the username is too long, truncate it in the navbar so that all buttons fit in the allocated width.