login gateway implementation with server