Updated login function in pryrc