added registersession method