Implemented login check