Fixed loop

Fixed endless cycle, if not logged on site.