Add support for safari (promise -webkit fallbacks)
fix session detection