adds better support for cors and sessions