Added wait if login requires authentication