Had a second look. Yes, your checking is stronger. A `contains` check is adequate if it checks for a string that ensures it is the correct page. e.g. check for page title and user id.
In bf478da, the only change I would do is to use `goToPreviousPage` instead of re-login.