added redirection for sign in and out