added test helper to handle login