adding logging and finishing up login