Add sessionCallback function to authenticate function

uses a callback function that can be used for setting the Session
variables