Added the possibility to set a device identifier

If the session object contains a device identifier,
the http user agent will be set to this identifier.
Otherwise the former user agent will be set.