fix fatal error in auth login()