Updated login code from Sabres