login check and timestamp update correctly