Fixed some html redirects and minor session stuffs