Corrections to login script