i have done something similar. if this is a gadget to work only on 1 google apps domain, then you can set the auth method to "Restricted to the following Google Apps Domain" (when creating the app engine), then on page load check for the user object and if it doesn't exist, to an auto redirect to the login url, and redirect back. for example:
user = users.get_current_user()
if user is None:
self.redirect(users.create_login_url(self.request.uri))
return
this will always work (and not end up in a infinate loop), as we know the user is logged in as the gadget is embedded in gmail.
a similar mechanism can be used using openid, but when you embed the gadget in gmail you will need to pass in the domain name, then query the domain name from your code and perform your open id instead of the redirect