implemented register username function