clean up login method