fixing redirect for unauthorized user