fixed oauth redirect and checking for pages without posts