def create
    if RAILS_ENV == 'development'
      session[:url] = params[:url]
      redirect_to homepage_path
      return
    end
    store = OpenID::Store::Filesystem.new(RAILS_ROOT + '/tmp')
    consumer = OpenID::Consumer.new(session, store)
    oid_req = consumer.begin params[:url]
    realm = request.protocol + request.host_with_port
    return_to = session_url
    redirect_to oid_req.redirect_url(realm, return_to)
  end