Fixed login issues from invite case