login function communication changed