finishing up login functionality