Added cookie session logic. added user authentication decorator.