Redirect and History API?

Hello, please tell me, is a form of login/password and redirect to the page only for registered users, on this page there is a button to exit, sends a request to /logout.
On the server this code
app.get('/adm', function(req, res) {
 Res. render('authAdmin', function(err, html) {
Res. send(html);
});'/adm', passport.authenticate('login', {
 successRedirect: '/adm/dashboard',
 failureRedirect: '/adm',
app.get('/logout', function(req, res, next) {
Res. redirect('/adm');
app.get('/adm/dashboard', passport.isAuthenticated, function(req, res) {

Triggered the redirect, but using the back button in the browser I can go back again to the "protected page" and this is not very good. You need to right vernusa to this page, not logged in again.
On the client you can write location.replace (), and then history will continue not to be, but I think I'm doing something wrong.
June 8th 19 at 16:31

Find more questions by tags JavaScriptNode.jsRESTful API