add login check
minor changes