* Added displayUsername and username update functionality
* fix: move username assignment to safe place
moved the username assignment down a statement so that it doesn't cause exception
* fix: handle missing username or displayUsername
* refactor: remove redundant code