changed login procedure