+ Start a Discussion

Cancel page - loaded using Sites , outof salesforce

cancel Functionality for visual force loading using Sites

I have created a page and its access using sites, when user loads the page out side the salesforce using site, and when they cancel the page by clicking cancel button its giving error:

Authorization Required 

You must first log in or register before accessing this page. 
If you have forgotten your password, click Forgot Password to reset it. 

How to cancel the page by command button

My code:
public class loadtrial {
    ApexPages.standardController load_t  = null;
    public loadtrial(ApexPages.standardController sc)
      load_t = sc;
    public PageReference Cancel()
      return load_t.cancel();