sign in and redirect fix