implemented basic login function.