- # Something is wrong, so rerender the form
- render :action => 'new'
- end
- elsif using_open_id?
- # The redirect from the OpenID provider reenters here
- # again and we need to pass the parameters through to
- # the open_id_authentication function
- @user = session.delete(:new_user)
-
- openid_verify(nil, @user) do |user|
- end
-
- if @user.openid_url.nil? or @user.invalid?
- render :action => 'new'
- else
- render :action => 'terms'
+ # Not logged in, so redirect to the login page
+ redirect_to :action => :login, :referer => request.request_uri