Checking login procedure