Cleans up login flow.