We are using force.com sites to build a application portal. Customer portal is being used in conjunction to enable self registration.
When a user tries to login ... we are executing the force.com site method like below
PageReference p = Site.login(username, password, '/apex/VF_ApplicantHomePage?Id=005J0000001HVIK'); return p;
However, I get an error when I try to login which says Error: Error occurred while loading a Visualforce page
The URL formed after login action is
Has anyone done the same thing? Can you suggest the work around? Thanks!