fixed username index page bug, added unit tests