Took out username and added global variable to detect current logged in user