adding getusername function to base view