LPS-43106 Use referer when possible to go back to the previous page