cannot get login to function