Modified to pull username and password first