Implemented hash token for logged in user (desktop and api);
Fixed various null reference errors;