added username checking to environment setup