added min username len and bug fix