Remove username global variable by placing it in function
Fix merge conflict