Tidy of page and route handling. Saving siteid on the session