fix for login()
added fix for login()