Added username and refactored test