Remove set username function from home controller to directive so it can be used anywhere and improve naming