sign in and redirect working