Corrected several bugs ... and prevented infitie redirect loops in case of Signing error