changed loop log to login