Fixed getting username and password function.