implemented login check to login