accounts: update username check func

Change-Id: Ie7ebf602fc256759dc7f1dcb9e5a736184ed22b7