updated login procedure