replaced deprecated use of user.authenticate by user.login