Added jsUri, cookie for return uri setup, xsrf stuff setup