In case of an error, should also redirect to the page being accessed