login utility method with username as parameter