fixed bug preventing state change in build

replaced ng-cookies with localstorage service to track session object