last visited URL is now saved to DB

- this is so that when you refresh the page from within moodle, it will
reload /index, which will check if user is logged in, and if he is,
redirect them to their last visited page, simulating what refreshing is
like on a regular page