Fixed a bug while redirecting to sign in view while logoged out