added session/authentication support

TODO refactor into reutilizable package