save last visited page in case of session timeout

in case of session timeout MMT remembers last visited page and login to
same location when user login again
minor bug fix