Remove dead code
Add test for duplicate usernames