Two changes:
Fix your variable assignment syntax:
export USERNAME='user'
To make this value always available to user, append the above code line to the file ~/.profile; this will set the variables during login, such that this will not need to be manually invoked at other times.
~/.profile