Removed useless redundant code after new generic function getUsernamePassword