Fix incorrect logging of user IP in User.login