implemented basic login procedure